//-----绑定的元素类型是在第二个；
#include <functional>
#include <iostream>

using namespace std;

class MyClass {
public:
    void print_data(int x) const {
        std::cout << "Data: " << x + data << std::endl;
    }

    int data = 10;
};

int main() {
    MyClass obj;
    auto bound_member_fn = std::bind(&MyClass::print_data, &obj, std::placeholders::_1);
    bound_member_fn(20); // 输出 "Data: 30"
    return 0;
}